//数据序列化类统一管理

import 'news_entity.dart';
import 'user_entity.dart';

class ModuleOneEntityFactory {
  static T generateOBJ<T>(json) {
    if (1 == 0) {
      return null;
    } else if (T.toString() == "String") {
      return json as T;
    }
    else if (T.toString() == "UserOneEntity") {
      return UserOneEntity.fromJson(json) as T;
    }else if (T.toString() == "NewsEntity") {
      return NewsEntity.fromJson(json) as T;
    }
    else {
      return null;
    }
  }
}